home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / utils / misc / bytefilter / source / bytefilter.s < prev   
Encoding:
Text File  |  1993-10-14  |  15.1 KB  |  762 lines

  1. ;
  2. ; ByteFilter V1.20   05-Sep-1993
  3. ;
  4. ; (c) 1993 by Jan Hagqvist
  5. ;
  6.  
  7. ; V0.01  Friday,   03-Sep-1993        ; Open window etc.
  8. ; V0.30  Saturday, 04-Sep-1993        ; Filter, slow mode
  9. ; V1.00  -      "     "      -        ; Filter, fast mode
  10. ; V1.05  Sunday,   05-Sep-1993        ; Fixed a bug in fast&slow-filter
  11. ; V1.20  -      "     "      -        ; Filter, ultrafast mode
  12.  
  13.  
  14.     include "jhextras.i"
  15.  
  16.   XREF _LVOOpenLibrary
  17.   XREF _LVOCloseLibrary
  18.   XREF _LVOOpenWindow
  19.   XREF _LVOCloseWindow
  20.   XREF _LVOWaitPort
  21.   XREF _LVOGetMsg
  22.   XREF _LVOReplyMsg
  23.   XREF _LVOMove
  24.   XREF _LVOText
  25.   XREF _LVOActivateGadget
  26.   XREF _LVORefreshGList
  27.   XREF _LVORemoveGadget
  28.   XREF _LVOAddGadget
  29.   XREF _LVOSetAPen
  30.   XREF _LVOOpen
  31.   XREF _LVOClose
  32.   XREF _LVOSeek
  33.   XREF _LVORead
  34.   XREF _LVOWrite
  35.   XREF _LVOAllocMem
  36.   XREF _LVOFreeMem
  37.  
  38.  
  39. JAM1                equ 0
  40. WBENCHSCREEN            equ 1
  41. GFLG_GADGHCOMP            equ $0000
  42. GFLG_GADGHIMAGE            equ $0002
  43. GFLG_DISABLED            equ $0100
  44. GACT_RELVERIFY            equ $0001
  45. GACT_TOGGLESELECT        equ $0100
  46. GTYP_BOOLGADGET            equ $0001
  47. GTYP_STRGADGET            equ $0004
  48. IDCMP_GADGETUP            equ $00000040
  49. IDCMP_CLOSEWINDOW        equ $00000200
  50. WFLG_SMART_REFRESH        equ $00000000
  51. WFLG_DRAGBAR            equ $00000002
  52. WFLG_DEPTHGADGET        equ $00000004
  53. WFLG_CLOSEGADGET        equ $00000008
  54. WFLG_ACTIVATE            equ $00001000
  55. WFLG_RMBTRAP            equ $00010000
  56.  
  57.  
  58. ByteFilter
  59.   move.l  4,a6
  60.   moveq.l #0,d0
  61.   lea     JHExtrasName(pc),a1
  62.   jsr     _LVOOpenLibrary(a6)
  63.   move.l  d0,JHExtrasBase
  64.   tst.l   d0
  65.   beq     Quit
  66.  
  67.   move.l  JHExtrasBase(pc),a0
  68.   move.l  ml_DosLib(a0),DosBase
  69.   move.l  ml_GfxLib(a0),GfxBase
  70.   move.l  ml_IntuitionLib(a0),IntuitionBase
  71.   move.w  ml_SysVersion(a0),SysVersion
  72.  
  73.   bsr     CreateHexGadgets
  74.  
  75.   move.l  IntuitionBase(pc),a6
  76.   lea     NewWindow(pc),a0
  77.   jsr     _LVOOpenWindow(a6)
  78.   move.l  d0,MyWindow
  79.   move.l  d0,a0
  80.   move.l  50(a0),MyRastPort
  81.   move.l  86(a0),MyUserPort
  82.  
  83.   lea     SourceNameGadget(pc),a0
  84.   bsr     ActivateGadget
  85.  
  86.   move.l  GfxBase(pc),a6
  87.   move.l  MyRastPort(pc),a1
  88.   moveq.l #2,d0
  89.   jsr     _LVOSetAPen(a6)
  90.  
  91.   move.l  #GreetsString,StatusArgs
  92.   bsr     ShowStatusLine
  93.  
  94.  
  95. WaitForMessage
  96.   tst.b   QuitFlag
  97.   bne     Quit
  98.  
  99.   move.l  4,a6
  100.   move.l  MyUserPort(pc),a0
  101.   jsr     _LVOWaitPort(a6)
  102. WaitForMessage2
  103.   move.l  4,a6
  104.   move.l  MyUserPort(pc),a0
  105.   jsr     _LVOGetMsg(a6)
  106.   tst.l   d0
  107.   beq.s   WaitForMessage
  108.   move.l  d0,a1
  109.   move.l  20(a1),Class
  110.   move.w  24(a1),Code
  111.   move.w  26(a1),Qualifier
  112.   move.l  28(a1),IAddress
  113.   jsr     _LVOReplyMsg(a6)
  114.   cmp.l   #IDCMP_CLOSEWINDOW,Class
  115.   bne.s   WaitForMessage3
  116.   move.b  #1,QuitFlag
  117. WaitForMessage3
  118.   cmp.l   #IDCMP_GADGETUP,Class
  119.   bne.s   WaitForMessage4
  120.   move.l  IAddress(pc),a0
  121.   tst.l   40(a0)
  122.   beq.s   WaitForMessage4
  123.   move.l  IntuitionBase(pc),a6
  124.   move.l  40(a0),a0
  125.   jsr     (a0)
  126. WaitForMessage4
  127.   bra     WaitForMessage2
  128.  
  129.  
  130. Quit
  131.   move.l  IntuitionBase(pc),a6
  132.   tst.l   MyWindow
  133.   beq.s   Quit2
  134.   move.l  MyWindow(pc),a0
  135.   jsr     _LVOCloseWindow(a6)
  136. Quit2
  137.   move.l  4,a6
  138.   tst.l   JHExtrasBase
  139.   beq.s   Quit3
  140.   move.l  JHExtrasBase(pc),a1
  141.   jsr     _LVOCloseLibrary(a6)
  142. Quit3
  143.   moveq.l #0,d0
  144.   rts
  145.  
  146.  
  147. ShowStatusLine
  148.   move.l  GfxBase(pc),a6
  149.   move.l  MyRastPort(pc),a1
  150.   move.l  #374,d0
  151.   move.l  #185,d1
  152.   jsr     _LVOMove(a6)
  153.  
  154.   move.l  JHExtrasBase(pc),a6
  155.   lea     StatusFormat(pc),a0
  156.   lea     StatusArgs(pc),a1
  157.   lea     StatusString,a2
  158.   jsr     _LVOJHFormatAString(a6)
  159.  
  160.   lea     StatusString,a0
  161.   jsr     _LVOJHStrLen(a6)
  162.   move.l  GfxBase(pc),a6
  163.   move.l  MyRastPort(pc),a1
  164.   jsr     _LVOText(a6)
  165.   rts
  166.  
  167. Invert
  168.   move.l  #InvertString,StatusArgs
  169.   bsr     ShowStatusLine
  170.  
  171.   move.l  IntuitionBase(pc),a6
  172.   lea     HexFlags,a3
  173.   lea     HexGadgets,a4
  174.   lea     IntuiTexts,a5
  175.   move.l  #255,d3
  176. Invert2
  177.   bchg    #0,0(a3,d3.w)
  178.  
  179.   bchg    #7,13(a4)
  180.  
  181.   add.l   #44,a4
  182.   add.l   #44,a5
  183.   dbf     d3,Invert2
  184.  
  185.   lea     HexGadgets,a0
  186.   move.l  MyWindow(pc),a1
  187.   sub.l   a2,a2
  188.   moveq.l #-1,d0
  189.   jsr     _LVORefreshGList(a6)
  190.  
  191.   move.l  #WaitingString,StatusArgs
  192.   bsr     ShowStatusLine
  193.   rts
  194.  
  195.  
  196. CheckHexFlag
  197.   lea     HexFlags,a3
  198.   move.l  IAddress,a4
  199.  
  200.   move.w  38(a4),d3            ; Byte number
  201.   bchg    #0,0(a3,d3.w)            ; Change byte state
  202.  
  203.   move.l  #WaitingString,StatusArgs
  204.   bsr     ShowStatusLine
  205.   rts
  206.  
  207. SourceName
  208.   lea     DestNameGadget(pc),a0
  209.   bsr     ActivateGadget
  210.  
  211.   move.l  #WaitingString,StatusArgs
  212.   bsr     ShowStatusLine
  213.   rts
  214.  
  215. DestName
  216.   lea     SourceNameGadget(pc),a0
  217.   bsr     ActivateGadget
  218.  
  219.   move.l  #WaitingString,StatusArgs
  220.   bsr     ShowStatusLine
  221.   rts
  222.  
  223.  
  224. Filter
  225.   move.l  DosBase(pc),a6
  226.   move.l  #SourceFileName,d1
  227.   move.l  #1005,d2
  228.   jsr     _LVOOpen(a6)
  229.   move.l  d0,d6                ; d6=sourcefile pointer
  230.   tst.l   d0
  231.   beq     NoSource
  232.  
  233.   move.l  JHExtrasBase(pc),a6
  234.   move.l  #DestFileName,d1
  235.   move.l  #1006,d2
  236.   move.l  MyWindow(pc),a0
  237.   jsr     _LVOJHOpen(a6)
  238.   move.l  d0,d7                ; d7=destfile pointer
  239.   tst.l   d0
  240.   beq     NoDest
  241.  
  242.   move.l  DosBase(pc),a6
  243.   move.l  d6,d1
  244.   moveq.l #0,d2
  245.   moveq.l #1,d3
  246.   jsr     _LVOSeek(a6)            ; Bounce to the end of the sourcefile
  247.   move.l  d6,d1
  248.   moveq.l #0,d2
  249.   moveq.l #-1,d3
  250.   jsr     _LVOSeek(a6)            ; And back to the beginning
  251.   move.l  d0,FileSize
  252.  
  253.   move.l  4,a6
  254.   move.l  FileSize(pc),d0
  255.   moveq.l #0,d1
  256.   jsr     _LVOAllocMem(a6)        ; Get mem for sourcefile
  257.   move.l  d0,SourceMem
  258.   tst.l   d0                ; Did we get the mem?
  259.   bne.s   GetMem            ; Yes
  260.   bsr     FilterSlow            ; No, do it slow
  261.   bra.s   GetMem2
  262. GetMem
  263.   move.l  4,a6
  264.   move.l  FileSize(pc),d0
  265.   moveq.l #0,d1
  266.   jsr     _LVOAllocMem(a6)        ; Get mem for sourcefile
  267.   move.l  d0,DestMem
  268.   tst.l   d0                ; Did we get the mem?
  269.   beq.s   GetMem1            ; No
  270.   bsr     FilterUltraFast        ; Do it ultrafast
  271.   bra.s   GetMem2
  272. GetMem1
  273.   bsr     FilterFast            ; Do it fast
  274. GetMem2
  275.   move.l  d0,d5                ; Store error flag
  276.   tst.l   DestMem
  277.   beq.s   GetMem3
  278.   move.l  4,a6
  279.   move.l  DestMem(pc),a1
  280.   move.l  FileSize(pc),d0
  281.   jsr     _LVOFreeMem(a6)        ; Free the mem
  282. GetMem3
  283.   tst.l   SourceMem
  284.   beq.s   GetMem4
  285.   move.l  4,a6
  286.   move.l  SourceMem(pc),a1
  287.   move.l  FileSize(pc),d0
  288.   jsr     _LVOFreeMem(a6)        ; Free the mem
  289. GetMem4
  290.  
  291.   move.l  DosBase(pc),a6
  292.   move.l  d7,d1
  293.   jsr     _LVOClose(a6)            ; Close destfile
  294.   move.l  d6,d1
  295.   jsr     _LVOClose(a6)            ; Close sourcefile
  296.  
  297.   cmp.l   #-1,d5            ; Was there a write error?
  298.   beq.s   FilterWriteError
  299.   move.l  #WaitingString,StatusArgs
  300.   bsr     ShowStatusLine
  301.   rts
  302. FilterWriteError
  303.   move.l  #WriteErrorString,StatusArgs
  304.   bsr     ShowStatusLine
  305.   rts
  306.  
  307. NoSource
  308.   move.l  #NoSourceString,StatusArgs
  309.   bsr     ShowStatusLine
  310.   rts
  311.  
  312. NoDest
  313.   move.l  DosBase(pc),a6
  314.   move.l  d6,d1
  315.   jsr     _LVOClose(a6)
  316.   move.l  #NoDestString,StatusArgs
  317.   bsr     ShowStatusLine
  318.   rts
  319.  
  320. FilterUltraFast
  321.   move.l  #FilteringUltraFastString,StatusArgs
  322.   bsr     ShowStatusLine
  323.   move.l  DosBase(pc),a6
  324.   move.l  d6,d1
  325.   move.l  SourceMem(pc),d2
  326.   move.l  FileSize(pc),d3
  327.   jsr     _LVORead(a6)            ; Read the source file
  328.   cmp.l   #-1,d0
  329.   beq.s   FilterUltraFast2
  330.  
  331.   move.l  FileSize(pc),d4
  332.   move.l  SourceMem(pc),a4
  333.   lea     HexFlags,a5
  334.   move.l  DestMem,a3
  335.   moveq.l #0,d5
  336. FilterUltraFast3
  337.   move.b  (a4)+,d0
  338.   ext.w   d0
  339.   and.w   #$00FF,d0
  340.   tst.b   0(a5,d0.w)
  341.   bne.s   FilterUltraFast3.1
  342.  
  343.   move.b  d0,(a3)+            ; Store it to the buffer
  344.   addq.l  #1,d5                ; Increase destfile length
  345. FilterUltraFast3.1
  346.   subq.l  #1,d4
  347.   tst.l   d4
  348.   bne.s   FilterUltraFast3
  349.  
  350.   move.l  d7,d1
  351.   move.l  DestMem(pc),d2
  352.   move.l  d5,d3
  353.   jsr     _LVOWrite(a6)            ; Write the destfile
  354. FilterUltraFast2
  355.   rts
  356.  
  357. FilterFast
  358.   move.l  #FilteringFastString,StatusArgs
  359.   bsr     ShowStatusLine
  360.   move.l  DosBase(pc),a6
  361.   move.l  d6,d1
  362.   move.l  SourceMem(pc),d2
  363.   move.l  FileSize(pc),d3
  364.   jsr     _LVORead(a6)            ; Read the source file
  365.   cmp.l   #-1,d0
  366.   beq.s   FilterFast2
  367.  
  368.   move.l  FileSize(pc),d4
  369.   move.l  SourceMem(pc),a4
  370.   lea     HexFlags,a5
  371.   lea     StatusString,a3
  372.   moveq.l #0,d5
  373. FilterFast3
  374.   move.b  (a4)+,d0
  375.   ext.w   d0
  376.   and.w   #$00FF,d0
  377.   tst.b   0(a5,d0.w)
  378.   bne.s   FilterFast3.1
  379.  
  380.   move.b  d0,(a3)+            ; Store it to the buffer
  381.   addq.l  #1,d5
  382.   cmp.w   #256,d5            ; Buffer full?
  383.   bne.s   FilterFast3.1            ; No
  384.  
  385.   move.l  d7,d1
  386.   move.l  #StatusString,d2
  387.   move.l  d5,d3
  388.   jsr     _LVOWrite(a6)            ; Write buffer
  389.   cmp.l   #-1,d0            ; Error?
  390.   beq.s   FilterFast2            ; Yes
  391.   lea     StatusString,a3
  392.   moveq.l #0,d5
  393. FilterFast3.1
  394.   subq.l  #1,d4
  395.   tst.l   d4
  396.   bne.s   FilterFast3
  397.  
  398.   move.l  d7,d1
  399.   move.l  #StatusString,d2
  400.   move.l  d5,d3
  401.   jsr     _LVOWrite(a6)            ; Write rest of the buffer
  402. FilterFast2
  403.   rts
  404.  
  405. FilterSlow
  406.   move.l  #FilteringSlowString,StatusArgs
  407.   bsr     ShowStatusLine
  408.   move.l  DosBase(pc),a6
  409. FilterSlow0
  410.   move.l  d6,d1
  411.   move.l  #StatusString,d2
  412.   move.l  #256,d3
  413.   jsr     _LVORead(a6)
  414.   tst.l   d0
  415.   beq.s   FilterSlow3.2
  416.   cmp.l   #-1,d0
  417.   beq.s   FilterSlow2
  418.  
  419.   move.l  d0,d4
  420.   lea     StatusString,a4
  421.   lea     HexFlags,a5
  422.   subq.l  #1,d4
  423.   move.l  a4,a3
  424.   moveq.l #0,d5
  425. FilterSlow3
  426.   move.b  (a4)+,d0
  427.   ext.w   d0
  428.   and.w   #$00FF,d0
  429.   tst.b   0(a5,d0.w)
  430.   bne.s   FilterSlow3.1
  431.  
  432.   move.b  d0,(a3)+            ; Store it to the buffer
  433.   addq.l  #1,d5
  434.   cmp.w   #256,d5            ; Buffer full?
  435.   bne.s   FilterSlow3.1            ; No
  436.  
  437.   move.l  d7,d1
  438.   move.l  #StatusString,d2
  439.   move.l  d5,d3
  440.   jsr     _LVOWrite(a6)
  441.   cmp.l   #-1,d0            ; Error?
  442.   beq.s   FilterSlow2            ; Yes
  443. FilterSlow3.1
  444.   dbf     d4,FilterSlow3
  445.   bra.s   FilterSlow0
  446. FilterSlow3.2
  447.   move.l  d7,d1
  448.   move.l  #StatusString,d2
  449.   move.l  d5,d3
  450.   jsr     _LVOWrite(a6)            ; Write rest of the buffer
  451. FilterSlow2
  452.   rts
  453.  
  454. ActivateGadget
  455.   move.l  IntuitionBase(pc),a6
  456.   move.l  MyWindow(pc),a1
  457.   sub.l   a2,a2
  458.   jsr     _LVOActivateGadget(a6)
  459.   rts
  460.  
  461. CreateHexGadgets
  462.   lea     HexGadgets,a3
  463.   lea     IntuiTexts,a4
  464.   lea     GadgetTexts,a5
  465.   lea     HexNumbers(pc),a2
  466.   move.l  #255,d3            ; Hex number
  467.   moveq.l #15,d4            ; y
  468. CreateHexGadgets2
  469.   moveq.l #15,d5            ; x
  470. CreateHexGadgets3
  471.   move.l  a3,a0
  472.   add.l   #44,a0
  473.   move.l  a0,(a3)            ; NextGadget
  474.  
  475.   move.l  d5,d0
  476.   mulu    #22,d0
  477.   add.l   #10,d0
  478.   move.w  d0,4(a3)            ; LeftEdge
  479.  
  480.   move.l  d4,d0
  481.   mulu    #11,d0
  482.   add.l   #14,d0
  483.   move.w  d0,6(a3)            ; TopEdge
  484.  
  485.   move.w  #22,8(a3)            ; Width
  486.   move.w  #11,10(a3)            ; Height
  487.   move.w  #GFLG_GADGHIMAGE,12(a3)    ; Flags
  488.   move.w  #GACT_RELVERIFY!GACT_TOGGLESELECT,14(a3)    ; Activation
  489.   move.w  #GTYP_BOOLGADGET,16(a3)    ; GadgetType
  490.   move.l  #HexBorder,18(a3)        ; GadgetRender
  491.   move.l  #HexBorder3,22(a3)        ; SelectRender
  492.   move.l  a4,26(a3)            ; GadgetText
  493.   move.l  #0,30(a3)            ; MutualExclude
  494.   move.l  #0,34(a3)            ; SpecialInfo
  495.   move.w  d3,38(a3)            ; GadgetID
  496.   move.l  #CheckHexFlag,40(a3)        ; UserData
  497.  
  498.   move.l  #$01020000,(a4)        ; FrontPen, BackPen, DrawMode, pad
  499.   move.l  #$00020002,4(a4)        ; LeftEdge, TopEdge
  500.   move.l  #Font0,8(a4)            ; ITextFont
  501.   move.l  a5,12(a4)            ; IText
  502.   move.l  #0,16(a4)            ; NextText
  503.  
  504.   move.w  d3,d0
  505.   and.w   #$00F0,d0
  506.   asr.w   #4,d0
  507.   move.b  0(a2,d0.w),(a5)        ; The first digit
  508.  
  509.   move.w  d3,d0
  510.   and.w   #$000F,d0
  511.   move.b  0(a2,d0.w),1(a5)        ; The second digit
  512.  
  513.   move.w  #0,2(a5)            ; Null-Terminate it!
  514.  
  515.   subq.l  #1,d3                ; The next hex number
  516.   add.l   #44,a3            ; The next gadget
  517.   add.l   #20,a4            ; The next intuitext
  518.   add.l   #4,a5                ; The next gadgettext
  519.  
  520.   dbf     d5,CreateHexGadgets3        ; The next x position
  521.   dbf     d4,CreateHexGadgets2        ; The next y position
  522.   move.l  #0,-44(a3)            ; No next gadget
  523.   rts
  524.  
  525.  
  526. NewWindow
  527.   dc.w 0,0,640,195
  528.   dc.b 0,2
  529.   dc.l IDCMP_CLOSEWINDOW!IDCMP_GADGETUP
  530.   dc.l WFLG_DRAGBAR!WFLG_DEPTHGADGET!WFLG_CLOSEGADGET!WFLG_SMART_REFRESH!WFLG_RMBTRAP!WFLG_ACTIVATE
  531.   dc.l SourceNameGadget,0,WindowTitle,0,0
  532.   dc.w 640,195,640,195,WBENCHSCREEN
  533.  
  534.  
  535. SourceNameGadget
  536.   dc.l DestNameGadget
  537.   dc.w 430,17,190,10,GFLG_GADGHCOMP,GACT_RELVERIFY,GTYP_STRGADGET
  538.   dc.l SourceNameBorder,0,SourceNameIText,0,SourceNameInfo
  539.   dc.w 0
  540.   dc.l SourceName
  541.  
  542. SourceNameInfo
  543.   dc.l SourceFileName,0
  544.   dc.w 0,75,0,0,0,0,0,0
  545.   dc.l 0,0,0
  546.  
  547. SourceNameIText
  548.   dc.b 1,2,JAM1,0
  549.   dc.w -56,0
  550.   dc.l Font0,SourceNameText,0
  551.  
  552. SourceNameBorder
  553.   dc.w -5,-3
  554.   dc.b 2,3,JAM1,5
  555.   dc.l SourceNameVectors,SourceNameBorder2
  556.  
  557. SourceNameBorder2
  558.   dc.w -6,-4
  559.   dc.b 1,2,JAM1,3
  560.   dc.l SourceNameVectors2,SourceNameBorder3
  561.  
  562. SourceNameBorder3
  563.   dc.w -4,-2
  564.   dc.b 1,2,JAM1,3
  565.   dc.l SourceNameVectors3,0
  566.  
  567. SourceNameVectors
  568.   dc.w 0,0,196,0,196,12,0,12,0,0
  569.  
  570. SourceNameVectors2
  571.   dc.w 2,14,198,14,198,2
  572.  
  573. SourceNameVectors3
  574.   dc.w 0,10,0,0,194,0
  575.  
  576. DestNameGadget
  577.   dc.l InvertGadget
  578.   dc.w 430,35,190,10,GFLG_GADGHCOMP,GACT_RELVERIFY,GTYP_STRGADGET
  579.   dc.l SourceNameBorder,0,DestNameIText,0,DestNameInfo
  580.   dc.w 0
  581.   dc.l DestName
  582.  
  583. DestNameInfo
  584.   dc.l DestFileName,0
  585.   dc.w 0,75,0,0,0,0,0,0
  586.   dc.l 0,0,0
  587.  
  588. DestNameIText
  589.   dc.b 1,2,JAM1,0
  590.   dc.w -56,0
  591.   dc.l Font0,DestNameText,0
  592.  
  593. InvertGadget
  594.   dc.l FilterGadget
  595.   dc.w 374,55,120,16,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET
  596.   dc.l InvertBorder,InvertBorder3,InvertIText,0,0
  597.   dc.w 0
  598.   dc.l Invert
  599.  
  600. InvertIText
  601.   dc.b 1,2,JAM1,0
  602.   dc.w 36,4
  603.   dc.l Font0,InvertText,0
  604.  
  605. InvertBorder
  606.   dc.w 0,0
  607.   dc.b 2,3,JAM1,3
  608.   dc.l InvertVectors,InvertBorder2
  609.  
  610. InvertBorder2
  611.   dc.w 0,0
  612.   dc.b 1,2,JAM1,3
  613.   dc.l InvertVectors2,0
  614.  
  615. InvertBorder3
  616.   dc.w 0,0
  617.   dc.b 2,3,JAM1,3
  618.   dc.l InvertVectors2,InvertBorder4
  619.  
  620. InvertBorder4
  621.   dc.w 0,0
  622.   dc.b 1,2,JAM1,3
  623.   dc.l InvertVectors,0
  624.  
  625. InvertVectors
  626.   dc.w 0,16,0,0,120,0
  627.  
  628. InvertVectors2
  629.   dc.w 0,16,120,16,120,0
  630.  
  631. FilterGadget
  632.   dc.l HexGadgets
  633.   dc.w 374,95,250,16,GFLG_GADGHIMAGE,GACT_RELVERIFY,GTYP_BOOLGADGET
  634.   dc.l FilterBorder,FilterBorder3,FilterIText,0,0
  635.   dc.w 0
  636.   dc.l Filter
  637.  
  638. FilterIText
  639.   dc.b 1,2,JAM1,0
  640.   dc.w 49,4
  641.   dc.l Font0,FilterText,0
  642.  
  643. FilterBorder
  644.   dc.w 0,0
  645.   dc.b 2,3,JAM1,3
  646.   dc.l FilterVectors,FilterBorder2
  647.  
  648. FilterBorder2
  649.   dc.w 0,0
  650.   dc.b 1,2,JAM1,3
  651.   dc.l FilterVectors2,0
  652.  
  653. FilterBorder3
  654.   dc.w 0,0
  655.   dc.b 2,3,JAM1,3
  656.   dc.l FilterVectors2,FilterBorder4
  657.  
  658. FilterBorder4
  659.   dc.w 0,0
  660.   dc.b 1,2,JAM1,3
  661.   dc.l FilterVectors,0
  662.  
  663. FilterVectors
  664.   dc.w 0,16,0,0,250,0
  665.  
  666. FilterVectors2
  667.   dc.w 0,16,250,16,250,0
  668.  
  669.  
  670.  
  671. HexBorder
  672.   dc.w 0,0
  673.   dc.b 2,3,JAM1,3
  674.   dc.l HexVectors,HexBorder2
  675.  
  676. HexBorder2
  677.   dc.w 0,0
  678.   dc.b 1,2,JAM1,3
  679.   dc.l HexVectors2,0
  680.  
  681. HexBorder3
  682.   dc.w 0,0
  683.   dc.b 2,3,JAM1,3
  684.   dc.l HexVectors2,HexBorder4
  685.  
  686. HexBorder4
  687.   dc.w 0,0
  688.   dc.b 1,2,JAM1,3
  689.   dc.l HexVectors,0
  690.  
  691. HexVectors
  692.   dc.w 0,10,0,0,21,0
  693.  
  694. HexVectors2
  695.   dc.w 0,10,21,10,21,0
  696.  
  697.  
  698. Font0
  699.   dc.l Font0Name
  700.   dc.w 8
  701.   dc.b 0,1
  702.  
  703.  
  704. JHExtrasBase        dc.l 0
  705. DosBase            dc.l 0
  706. GfxBase            dc.l 0
  707. IntuitionBase        dc.l 0
  708. MyWindow        dc.l 0
  709. MyRastPort        dc.l 0
  710. MyUserPort        dc.l 0
  711. MyProcess        dc.l 0
  712. FileSize        dc.l 0
  713. SourceMem        dc.l 0
  714. DestMem            dc.l 0
  715. StatusArgs        dc.l 0,0
  716.  
  717. Class            dc.l 0
  718. IAddress        dc.l 0
  719. Code            dc.w 0
  720. Qualifier        dc.w 0
  721.  
  722. SysVersion        dc.w 0
  723.  
  724. QuitFlag        dc.b 0
  725.  
  726. VersionString        dc.b '$VER: '
  727. WindowTitle        dc.b 'ByteFilter V1.20   05-Sep-1993',0
  728. JHExtrasName        dc.b 'jhextras.library',0
  729. Font0Name        dc.b 'topaz.font',0
  730. HexNumbers        dc.b '0123456789ABCDEF',0
  731.  
  732. StatusFormat        dc.b '%-30s',0
  733. GreetsString        dc.b 'Welcome to ByteFilter.',0
  734. InvertString        dc.b 'Inverting...',0
  735. WaitingString        dc.b 'Waiting for action.',0
  736. FilteringSlowString    dc.b 'Filtering, dead slow mode.',0
  737. FilteringFastString    dc.b 'Filtering, fast mode.',0
  738. FilteringUltraFastString dc.b 'Filtering, ultra fast mode.',0
  739. NoSourceString        dc.b 'Can''t open source file.',0
  740. NoDestString        dc.b 'Can''t open destination file.',0
  741. WriteErrorString    dc.b 'Read/Write error.',0
  742.  
  743. SourceNameText        dc.b 'Source',0
  744. DestNameText        dc.b 'Dest  ',0
  745. InvertText        dc.b 'Invert',0
  746. FilterText        dc.b 'Begin the filtering',0
  747.  
  748.   SECTION GadgetStuff,BSS
  749.  
  750. HexGadgets        dcb.b 44*256,0
  751. IntuiTexts        dcb.b 20*256,0
  752. GadgetTexts        dcb.b 4*256,0
  753.  
  754.   SECTION OtherStuff,BSS
  755.  
  756. SourceFileName        dcb.b 75,0
  757. DestFileName        dcb.b 75,0
  758. HexFlags        dcb.b 256,0
  759. StatusString        dcb.b 256,0
  760.  
  761.   END
  762.